#pragma once
// MESSAGE REMOTE_CONTROL_SEND_STATUS PACKING

#define MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS 211


typedef struct __mavlink_remote_control_send_status_t {
 uint64_t time_unix_usec; /*<  Timestamp (UNIX epoch time)*/
 uint16_t x_lus[10]; /*<  x1 (int array)*/
 uint16_t y_lus[10]; /*<  y1 (int array)*/
 uint16_t x_rds[10]; /*<  x2 (int array)*/
 uint16_t y_rds[10]; /*<  y2 (int array)*/
 uint8_t ai_mode_1; /*<  obj lock status 0:close, 1:multi 2:single*/
 uint8_t ai_mode_2; /*<  obj fight status*/
 uint8_t control_status; /*<  uav control status*/
 uint8_t gimbal_status; /*<  gimbal status*/
 uint8_t ai_rect_num; /*<  Number of valid boxes (0..10)*/
 uint8_t track_ids[10]; /*<  tracker ids*/
} mavlink_remote_control_send_status_t;

#define MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN 103
#define MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN 103
#define MAVLINK_MSG_ID_211_LEN 103
#define MAVLINK_MSG_ID_211_MIN_LEN 103

#define MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC 172
#define MAVLINK_MSG_ID_211_CRC 172

#define MAVLINK_MSG_REMOTE_CONTROL_SEND_STATUS_FIELD_X_LUS_LEN 10
#define MAVLINK_MSG_REMOTE_CONTROL_SEND_STATUS_FIELD_Y_LUS_LEN 10
#define MAVLINK_MSG_REMOTE_CONTROL_SEND_STATUS_FIELD_X_RDS_LEN 10
#define MAVLINK_MSG_REMOTE_CONTROL_SEND_STATUS_FIELD_Y_RDS_LEN 10
#define MAVLINK_MSG_REMOTE_CONTROL_SEND_STATUS_FIELD_TRACK_IDS_LEN 10

#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_REMOTE_CONTROL_SEND_STATUS { \
    211, \
    "REMOTE_CONTROL_SEND_STATUS", \
    11, \
    {  { "time_unix_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_remote_control_send_status_t, time_unix_usec) }, \
         { "ai_mode_1", NULL, MAVLINK_TYPE_UINT8_T, 0, 88, offsetof(mavlink_remote_control_send_status_t, ai_mode_1) }, \
         { "ai_mode_2", NULL, MAVLINK_TYPE_UINT8_T, 0, 89, offsetof(mavlink_remote_control_send_status_t, ai_mode_2) }, \
         { "control_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 90, offsetof(mavlink_remote_control_send_status_t, control_status) }, \
         { "gimbal_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 91, offsetof(mavlink_remote_control_send_status_t, gimbal_status) }, \
         { "ai_rect_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 92, offsetof(mavlink_remote_control_send_status_t, ai_rect_num) }, \
         { "track_ids", NULL, MAVLINK_TYPE_UINT8_T, 10, 93, offsetof(mavlink_remote_control_send_status_t, track_ids) }, \
         { "x_lus", NULL, MAVLINK_TYPE_UINT16_T, 10, 8, offsetof(mavlink_remote_control_send_status_t, x_lus) }, \
         { "y_lus", NULL, MAVLINK_TYPE_UINT16_T, 10, 28, offsetof(mavlink_remote_control_send_status_t, y_lus) }, \
         { "x_rds", NULL, MAVLINK_TYPE_UINT16_T, 10, 48, offsetof(mavlink_remote_control_send_status_t, x_rds) }, \
         { "y_rds", NULL, MAVLINK_TYPE_UINT16_T, 10, 68, offsetof(mavlink_remote_control_send_status_t, y_rds) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_REMOTE_CONTROL_SEND_STATUS { \
    "REMOTE_CONTROL_SEND_STATUS", \
    11, \
    {  { "time_unix_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_remote_control_send_status_t, time_unix_usec) }, \
         { "ai_mode_1", NULL, MAVLINK_TYPE_UINT8_T, 0, 88, offsetof(mavlink_remote_control_send_status_t, ai_mode_1) }, \
         { "ai_mode_2", NULL, MAVLINK_TYPE_UINT8_T, 0, 89, offsetof(mavlink_remote_control_send_status_t, ai_mode_2) }, \
         { "control_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 90, offsetof(mavlink_remote_control_send_status_t, control_status) }, \
         { "gimbal_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 91, offsetof(mavlink_remote_control_send_status_t, gimbal_status) }, \
         { "ai_rect_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 92, offsetof(mavlink_remote_control_send_status_t, ai_rect_num) }, \
         { "track_ids", NULL, MAVLINK_TYPE_UINT8_T, 10, 93, offsetof(mavlink_remote_control_send_status_t, track_ids) }, \
         { "x_lus", NULL, MAVLINK_TYPE_UINT16_T, 10, 8, offsetof(mavlink_remote_control_send_status_t, x_lus) }, \
         { "y_lus", NULL, MAVLINK_TYPE_UINT16_T, 10, 28, offsetof(mavlink_remote_control_send_status_t, y_lus) }, \
         { "x_rds", NULL, MAVLINK_TYPE_UINT16_T, 10, 48, offsetof(mavlink_remote_control_send_status_t, x_rds) }, \
         { "y_rds", NULL, MAVLINK_TYPE_UINT16_T, 10, 68, offsetof(mavlink_remote_control_send_status_t, y_rds) }, \
         } \
}
#endif

/**
 * @brief Pack a remote_control_send_status message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_unix_usec  Timestamp (UNIX epoch time)
 * @param ai_mode_1  obj lock status 0:close, 1:multi 2:single
 * @param ai_mode_2  obj fight status
 * @param control_status  uav control status
 * @param gimbal_status  gimbal status
 * @param ai_rect_num  Number of valid boxes (0..10)
 * @param track_ids  tracker ids
 * @param x_lus  x1 (int array)
 * @param y_lus  y1 (int array)
 * @param x_rds  x2 (int array)
 * @param y_rds  y2 (int array)
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_remote_control_send_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint64_t time_unix_usec, uint8_t ai_mode_1, uint8_t ai_mode_2, uint8_t control_status, uint8_t gimbal_status, uint8_t ai_rect_num, const uint8_t *track_ids, const uint16_t *x_lus, const uint16_t *y_lus, const uint16_t *x_rds, const uint16_t *y_rds)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_uint8_t(buf, 88, ai_mode_1);
    _mav_put_uint8_t(buf, 89, ai_mode_2);
    _mav_put_uint8_t(buf, 90, control_status);
    _mav_put_uint8_t(buf, 91, gimbal_status);
    _mav_put_uint8_t(buf, 92, ai_rect_num);
    _mav_put_uint16_t_array(buf, 8, x_lus, 10);
    _mav_put_uint16_t_array(buf, 28, y_lus, 10);
    _mav_put_uint16_t_array(buf, 48, x_rds, 10);
    _mav_put_uint16_t_array(buf, 68, y_rds, 10);
    _mav_put_uint8_t_array(buf, 93, track_ids, 10);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN);
#else
    mavlink_remote_control_send_status_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.ai_mode_1 = ai_mode_1;
    packet.ai_mode_2 = ai_mode_2;
    packet.control_status = control_status;
    packet.gimbal_status = gimbal_status;
    packet.ai_rect_num = ai_rect_num;
    mav_array_memcpy(packet.x_lus, x_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.y_lus, y_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.x_rds, x_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.y_rds, y_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.track_ids, track_ids, sizeof(uint8_t)*10);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC);
}

/**
 * @brief Pack a remote_control_send_status message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_unix_usec  Timestamp (UNIX epoch time)
 * @param ai_mode_1  obj lock status 0:close, 1:multi 2:single
 * @param ai_mode_2  obj fight status
 * @param control_status  uav control status
 * @param gimbal_status  gimbal status
 * @param ai_rect_num  Number of valid boxes (0..10)
 * @param track_ids  tracker ids
 * @param x_lus  x1 (int array)
 * @param y_lus  y1 (int array)
 * @param x_rds  x2 (int array)
 * @param y_rds  y2 (int array)
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_remote_control_send_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
                               uint64_t time_unix_usec, uint8_t ai_mode_1, uint8_t ai_mode_2, uint8_t control_status, uint8_t gimbal_status, uint8_t ai_rect_num, const uint8_t *track_ids, const uint16_t *x_lus, const uint16_t *y_lus, const uint16_t *x_rds, const uint16_t *y_rds)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_uint8_t(buf, 88, ai_mode_1);
    _mav_put_uint8_t(buf, 89, ai_mode_2);
    _mav_put_uint8_t(buf, 90, control_status);
    _mav_put_uint8_t(buf, 91, gimbal_status);
    _mav_put_uint8_t(buf, 92, ai_rect_num);
    _mav_put_uint16_t_array(buf, 8, x_lus, 10);
    _mav_put_uint16_t_array(buf, 28, y_lus, 10);
    _mav_put_uint16_t_array(buf, 48, x_rds, 10);
    _mav_put_uint16_t_array(buf, 68, y_rds, 10);
    _mav_put_uint8_t_array(buf, 93, track_ids, 10);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN);
#else
    mavlink_remote_control_send_status_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.ai_mode_1 = ai_mode_1;
    packet.ai_mode_2 = ai_mode_2;
    packet.control_status = control_status;
    packet.gimbal_status = gimbal_status;
    packet.ai_rect_num = ai_rect_num;
    mav_array_memcpy(packet.x_lus, x_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.y_lus, y_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.x_rds, x_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.y_rds, y_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.track_ids, track_ids, sizeof(uint8_t)*10);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS;
#if MAVLINK_CRC_EXTRA
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC);
#else
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN);
#endif
}

/**
 * @brief Pack a remote_control_send_status message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_unix_usec  Timestamp (UNIX epoch time)
 * @param ai_mode_1  obj lock status 0:close, 1:multi 2:single
 * @param ai_mode_2  obj fight status
 * @param control_status  uav control status
 * @param gimbal_status  gimbal status
 * @param ai_rect_num  Number of valid boxes (0..10)
 * @param track_ids  tracker ids
 * @param x_lus  x1 (int array)
 * @param y_lus  y1 (int array)
 * @param x_rds  x2 (int array)
 * @param y_rds  y2 (int array)
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_remote_control_send_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint64_t time_unix_usec,uint8_t ai_mode_1,uint8_t ai_mode_2,uint8_t control_status,uint8_t gimbal_status,uint8_t ai_rect_num,const uint8_t *track_ids,const uint16_t *x_lus,const uint16_t *y_lus,const uint16_t *x_rds,const uint16_t *y_rds)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_uint8_t(buf, 88, ai_mode_1);
    _mav_put_uint8_t(buf, 89, ai_mode_2);
    _mav_put_uint8_t(buf, 90, control_status);
    _mav_put_uint8_t(buf, 91, gimbal_status);
    _mav_put_uint8_t(buf, 92, ai_rect_num);
    _mav_put_uint16_t_array(buf, 8, x_lus, 10);
    _mav_put_uint16_t_array(buf, 28, y_lus, 10);
    _mav_put_uint16_t_array(buf, 48, x_rds, 10);
    _mav_put_uint16_t_array(buf, 68, y_rds, 10);
    _mav_put_uint8_t_array(buf, 93, track_ids, 10);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN);
#else
    mavlink_remote_control_send_status_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.ai_mode_1 = ai_mode_1;
    packet.ai_mode_2 = ai_mode_2;
    packet.control_status = control_status;
    packet.gimbal_status = gimbal_status;
    packet.ai_rect_num = ai_rect_num;
    mav_array_memcpy(packet.x_lus, x_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.y_lus, y_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.x_rds, x_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.y_rds, y_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.track_ids, track_ids, sizeof(uint8_t)*10);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC);
}

/**
 * @brief Encode a remote_control_send_status struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param remote_control_send_status C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_remote_control_send_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_remote_control_send_status_t* remote_control_send_status)
{
    return mavlink_msg_remote_control_send_status_pack(system_id, component_id, msg, remote_control_send_status->time_unix_usec, remote_control_send_status->ai_mode_1, remote_control_send_status->ai_mode_2, remote_control_send_status->control_status, remote_control_send_status->gimbal_status, remote_control_send_status->ai_rect_num, remote_control_send_status->track_ids, remote_control_send_status->x_lus, remote_control_send_status->y_lus, remote_control_send_status->x_rds, remote_control_send_status->y_rds);
}

/**
 * @brief Encode a remote_control_send_status struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param remote_control_send_status C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_remote_control_send_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_remote_control_send_status_t* remote_control_send_status)
{
    return mavlink_msg_remote_control_send_status_pack_chan(system_id, component_id, chan, msg, remote_control_send_status->time_unix_usec, remote_control_send_status->ai_mode_1, remote_control_send_status->ai_mode_2, remote_control_send_status->control_status, remote_control_send_status->gimbal_status, remote_control_send_status->ai_rect_num, remote_control_send_status->track_ids, remote_control_send_status->x_lus, remote_control_send_status->y_lus, remote_control_send_status->x_rds, remote_control_send_status->y_rds);
}

/**
 * @brief Encode a remote_control_send_status struct with provided status structure
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 * @param remote_control_send_status C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_remote_control_send_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_remote_control_send_status_t* remote_control_send_status)
{
    return mavlink_msg_remote_control_send_status_pack_status(system_id, component_id, _status, msg,  remote_control_send_status->time_unix_usec, remote_control_send_status->ai_mode_1, remote_control_send_status->ai_mode_2, remote_control_send_status->control_status, remote_control_send_status->gimbal_status, remote_control_send_status->ai_rect_num, remote_control_send_status->track_ids, remote_control_send_status->x_lus, remote_control_send_status->y_lus, remote_control_send_status->x_rds, remote_control_send_status->y_rds);
}

/**
 * @brief Send a remote_control_send_status message
 * @param chan MAVLink channel to send the message
 *
 * @param time_unix_usec  Timestamp (UNIX epoch time)
 * @param ai_mode_1  obj lock status 0:close, 1:multi 2:single
 * @param ai_mode_2  obj fight status
 * @param control_status  uav control status
 * @param gimbal_status  gimbal status
 * @param ai_rect_num  Number of valid boxes (0..10)
 * @param track_ids  tracker ids
 * @param x_lus  x1 (int array)
 * @param y_lus  y1 (int array)
 * @param x_rds  x2 (int array)
 * @param y_rds  y2 (int array)
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_remote_control_send_status_send(mavlink_channel_t chan, uint64_t time_unix_usec, uint8_t ai_mode_1, uint8_t ai_mode_2, uint8_t control_status, uint8_t gimbal_status, uint8_t ai_rect_num, const uint8_t *track_ids, const uint16_t *x_lus, const uint16_t *y_lus, const uint16_t *x_rds, const uint16_t *y_rds)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_uint8_t(buf, 88, ai_mode_1);
    _mav_put_uint8_t(buf, 89, ai_mode_2);
    _mav_put_uint8_t(buf, 90, control_status);
    _mav_put_uint8_t(buf, 91, gimbal_status);
    _mav_put_uint8_t(buf, 92, ai_rect_num);
    _mav_put_uint16_t_array(buf, 8, x_lus, 10);
    _mav_put_uint16_t_array(buf, 28, y_lus, 10);
    _mav_put_uint16_t_array(buf, 48, x_rds, 10);
    _mav_put_uint16_t_array(buf, 68, y_rds, 10);
    _mav_put_uint8_t_array(buf, 93, track_ids, 10);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS, buf, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC);
#else
    mavlink_remote_control_send_status_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.ai_mode_1 = ai_mode_1;
    packet.ai_mode_2 = ai_mode_2;
    packet.control_status = control_status;
    packet.gimbal_status = gimbal_status;
    packet.ai_rect_num = ai_rect_num;
    mav_array_memcpy(packet.x_lus, x_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.y_lus, y_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.x_rds, x_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.y_rds, y_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet.track_ids, track_ids, sizeof(uint8_t)*10);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS, (const char *)&packet, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC);
#endif
}

/**
 * @brief Send a remote_control_send_status message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_remote_control_send_status_send_struct(mavlink_channel_t chan, const mavlink_remote_control_send_status_t* remote_control_send_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_remote_control_send_status_send(chan, remote_control_send_status->time_unix_usec, remote_control_send_status->ai_mode_1, remote_control_send_status->ai_mode_2, remote_control_send_status->control_status, remote_control_send_status->gimbal_status, remote_control_send_status->ai_rect_num, remote_control_send_status->track_ids, remote_control_send_status->x_lus, remote_control_send_status->y_lus, remote_control_send_status->x_rds, remote_control_send_status->y_rds);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS, (const char *)remote_control_send_status, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC);
#endif
}

#if MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This variant of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_remote_control_send_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint64_t time_unix_usec, uint8_t ai_mode_1, uint8_t ai_mode_2, uint8_t control_status, uint8_t gimbal_status, uint8_t ai_rect_num, const uint8_t *track_ids, const uint16_t *x_lus, const uint16_t *y_lus, const uint16_t *x_rds, const uint16_t *y_rds)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_uint8_t(buf, 88, ai_mode_1);
    _mav_put_uint8_t(buf, 89, ai_mode_2);
    _mav_put_uint8_t(buf, 90, control_status);
    _mav_put_uint8_t(buf, 91, gimbal_status);
    _mav_put_uint8_t(buf, 92, ai_rect_num);
    _mav_put_uint16_t_array(buf, 8, x_lus, 10);
    _mav_put_uint16_t_array(buf, 28, y_lus, 10);
    _mav_put_uint16_t_array(buf, 48, x_rds, 10);
    _mav_put_uint16_t_array(buf, 68, y_rds, 10);
    _mav_put_uint8_t_array(buf, 93, track_ids, 10);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS, buf, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC);
#else
    mavlink_remote_control_send_status_t *packet = (mavlink_remote_control_send_status_t *)msgbuf;
    packet->time_unix_usec = time_unix_usec;
    packet->ai_mode_1 = ai_mode_1;
    packet->ai_mode_2 = ai_mode_2;
    packet->control_status = control_status;
    packet->gimbal_status = gimbal_status;
    packet->ai_rect_num = ai_rect_num;
    mav_array_memcpy(packet->x_lus, x_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet->y_lus, y_lus, sizeof(uint16_t)*10);
    mav_array_memcpy(packet->x_rds, x_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet->y_rds, y_rds, sizeof(uint16_t)*10);
    mav_array_memcpy(packet->track_ids, track_ids, sizeof(uint8_t)*10);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS, (const char *)packet, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_CRC);
#endif
}
#endif

#endif

// MESSAGE REMOTE_CONTROL_SEND_STATUS UNPACKING


/**
 * @brief Get field time_unix_usec from remote_control_send_status message
 *
 * @return  Timestamp (UNIX epoch time)
 */
static inline uint64_t mavlink_msg_remote_control_send_status_get_time_unix_usec(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint64_t(msg,  0);
}

/**
 * @brief Get field ai_mode_1 from remote_control_send_status message
 *
 * @return  obj lock status 0:close, 1:multi 2:single
 */
static inline uint8_t mavlink_msg_remote_control_send_status_get_ai_mode_1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  88);
}

/**
 * @brief Get field ai_mode_2 from remote_control_send_status message
 *
 * @return  obj fight status
 */
static inline uint8_t mavlink_msg_remote_control_send_status_get_ai_mode_2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  89);
}

/**
 * @brief Get field control_status from remote_control_send_status message
 *
 * @return  uav control status
 */
static inline uint8_t mavlink_msg_remote_control_send_status_get_control_status(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  90);
}

/**
 * @brief Get field gimbal_status from remote_control_send_status message
 *
 * @return  gimbal status
 */
static inline uint8_t mavlink_msg_remote_control_send_status_get_gimbal_status(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  91);
}

/**
 * @brief Get field ai_rect_num from remote_control_send_status message
 *
 * @return  Number of valid boxes (0..10)
 */
static inline uint8_t mavlink_msg_remote_control_send_status_get_ai_rect_num(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  92);
}

/**
 * @brief Get field track_ids from remote_control_send_status message
 *
 * @return  tracker ids
 */
static inline uint16_t mavlink_msg_remote_control_send_status_get_track_ids(const mavlink_message_t* msg, uint8_t *track_ids)
{
    return _MAV_RETURN_uint8_t_array(msg, track_ids, 10,  93);
}

/**
 * @brief Get field x_lus from remote_control_send_status message
 *
 * @return  x1 (int array)
 */
static inline uint16_t mavlink_msg_remote_control_send_status_get_x_lus(const mavlink_message_t* msg, uint16_t *x_lus)
{
    return _MAV_RETURN_uint16_t_array(msg, x_lus, 10,  8);
}

/**
 * @brief Get field y_lus from remote_control_send_status message
 *
 * @return  y1 (int array)
 */
static inline uint16_t mavlink_msg_remote_control_send_status_get_y_lus(const mavlink_message_t* msg, uint16_t *y_lus)
{
    return _MAV_RETURN_uint16_t_array(msg, y_lus, 10,  28);
}

/**
 * @brief Get field x_rds from remote_control_send_status message
 *
 * @return  x2 (int array)
 */
static inline uint16_t mavlink_msg_remote_control_send_status_get_x_rds(const mavlink_message_t* msg, uint16_t *x_rds)
{
    return _MAV_RETURN_uint16_t_array(msg, x_rds, 10,  48);
}

/**
 * @brief Get field y_rds from remote_control_send_status message
 *
 * @return  y2 (int array)
 */
static inline uint16_t mavlink_msg_remote_control_send_status_get_y_rds(const mavlink_message_t* msg, uint16_t *y_rds)
{
    return _MAV_RETURN_uint16_t_array(msg, y_rds, 10,  68);
}

/**
 * @brief Decode a remote_control_send_status message into a struct
 *
 * @param msg The message to decode
 * @param remote_control_send_status C-struct to decode the message contents into
 */
static inline void mavlink_msg_remote_control_send_status_decode(const mavlink_message_t* msg, mavlink_remote_control_send_status_t* remote_control_send_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    remote_control_send_status->time_unix_usec = mavlink_msg_remote_control_send_status_get_time_unix_usec(msg);
    mavlink_msg_remote_control_send_status_get_x_lus(msg, remote_control_send_status->x_lus);
    mavlink_msg_remote_control_send_status_get_y_lus(msg, remote_control_send_status->y_lus);
    mavlink_msg_remote_control_send_status_get_x_rds(msg, remote_control_send_status->x_rds);
    mavlink_msg_remote_control_send_status_get_y_rds(msg, remote_control_send_status->y_rds);
    remote_control_send_status->ai_mode_1 = mavlink_msg_remote_control_send_status_get_ai_mode_1(msg);
    remote_control_send_status->ai_mode_2 = mavlink_msg_remote_control_send_status_get_ai_mode_2(msg);
    remote_control_send_status->control_status = mavlink_msg_remote_control_send_status_get_control_status(msg);
    remote_control_send_status->gimbal_status = mavlink_msg_remote_control_send_status_get_gimbal_status(msg);
    remote_control_send_status->ai_rect_num = mavlink_msg_remote_control_send_status_get_ai_rect_num(msg);
    mavlink_msg_remote_control_send_status_get_track_ids(msg, remote_control_send_status->track_ids);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN? msg->len : MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN;
        memset(remote_control_send_status, 0, MAVLINK_MSG_ID_REMOTE_CONTROL_SEND_STATUS_LEN);
    memcpy(remote_control_send_status, _MAV_PAYLOAD(msg), len);
#endif
}
